

package com.wake.widget.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;

import androidx.core.view.WindowInsetsCompat;

import com.wake.widget.layout.NMUIConstraintLayout;
import com.wake.widget.util.NMUIWindowInsetHelper;

public class NMUIWindowInsetLayout2 extends NMUIConstraintLayout {
    public NMUIWindowInsetLayout2(Context context) {
        this(context, null);
    }

    public NMUIWindowInsetLayout2(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public NMUIWindowInsetLayout2(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public void setFitsSystemWindows(boolean fitSystemWindows) {
        // do nothing.
    }

    @Override
    public void onViewAdded(View view) {
        super.onViewAdded(view);
        NMUIWindowInsetHelper.handleWindowInsets(view, WindowInsetsCompat.Type.statusBars() | WindowInsetsCompat.Type.displayCutout());
    }
}
